﻿using System;
using System.Collections.Generic;


using System.Text;
using Data;
using Entity;
using System.Data;

namespace Business
{
    public class FAQ_Bussiness
    {
        public bool Add_FAQ(FAQ_Entity FAQ)
        {
            FAQ_Data add_FAQ = new FAQ_Data();
            return add_FAQ.Insert_FAQ(FAQ);
        }

        public DataTable LoadP()
        {
            FAQ_Data pro = new FAQ_Data();
            try
            {
                return pro.LoadP();
            }
            catch
            {
                throw;
            }
            finally
            {
                pro = null;
            }
        }

        public int Update(int faqID, string ques, string ans)
        {
            FAQ_Data pr = new FAQ_Data();
            try
            {
                return pr.Update_FAQ(faqID,  ques, ans);
            }
            catch
            {
                throw;
            }
            finally
            {
                pr = null;
            }
        }

        public int Delete(int faqID)
        {
            FAQ_Data pDa = new FAQ_Data();
            try
            {
                return pDa.Delete_FAQ(faqID);
            }
            catch
            {
                throw;
            }
            finally
            {
                pDa = null;
            }
        }
    }
}
